[deps]
musl
libffi
gettext
zlib

[deps.host]
perl
pkgconf

[mirrors]
http://ftp.gnome.org/pub/gnome/sources/glib/2.36/glib-2.36.3.tar.xz

[main]
filesize=6626972
sha512=1ea45e7978bffb8ec23c8eddb74b0bab686126fd55d96956203bc1eef44e3047edcf2cbc39e018c83e56093f806c739bf320e6a359b45cd652e55c94a6f1ad19

[build]
for p in glib-gtimer-varargs glib-no_python ; do
	echo $p
	patch -p1 < "$K"/$p.patch || exit 1
done

this_dir="$PWD"
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine) --with-sysroot=$butch_root_dir"

CFLAGS="-D_GNU_SOURCE -D_BSD_SOURCE -Dloff_t=off_t $optcflags" \
LDFLAGS="$optldflags" ./configure -C $xconfflags \
  --prefix="$butch_prefix" --disable-modular-tests --disable-selinux --disable-fam \
  --disable-silent-rules glib_cv_stack_grows=no glib_cv_uscore=no \
  ac_cv_func_posix_getpwuid_r=yes ac_cv_func_posix_getgrgid_r=yes || exit 1

echo '#include <string.h>' >> config.h

# skip over bogus "missing" checks that only waste time or cause build errors
echo true > missing

make V=1 -j$MAKE_THREADS DESTDIR="$butch_install_dir" \
  LDFLAGS="-Wl,-rpath-link=$this_dir/gthread/.libs/ -Wl,-rpath-link=$this_dir/gmodule/.libs/" \
  || exit 1
make DESTDIR="$butch_install_dir" install || exit 1

